<template>
    <div class="suppliers-goods">
        <search-form :searchArray="searchArray">
            <el-button type="primary" class="btn search mL20">批量生产商品</el-button>
        </search-form>
        <elTable :formData="formData" @tableData="getList" ref="dataInfo">
                <el-table-column prop="name" align="center"
                 type="selection"
                  width="55"
                ></el-table-column>
                <el-table-column prop="group" label="产品名称" align="center"></el-table-column>
                <el-table-column prop="group" label="生产厂家" align="center"></el-table-column>
                <el-table-column prop="group" label="产品ID" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="批准文号" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="规格/医保/处方" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="是否关联" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="首次推送" align="center"></el-table-column>
                <el-table-column prop="loginTime" label="最近推送" align="center"></el-table-column>
                <el-table-column prop="action" label="操作" align="center" width="160px">
                    <template slot-scope="">
                    </template>
                </el-table-column>
            </elTable>
    </div>
</template>
<script>
import elTable from "@/components/xForm/elTable"
export default {
    name: 'suppliersGoods',
    components: {
       elTable 
    },
    data () {
        return {
            formData: {
                currentPage: 1,
                pageSize: 10,
            },
            searchArray: [
                {
                    type: "input",
                    placeholder: "请输入产品名称",
                    types: "text",
                    value: "",
                    label: "产品名称"
                },
                {
                    type: "input",
                    placeholder: "请输入批准文号",
                    types: "text",
                    value: "",
                    label: "批准文号"
                },
                {
                    type: "select",
                    placeholder: "请选择",
                    value: "",
                    label: "供应商",
                    list: []
                },
                {
                    type: "select",
                    placeholder: "请选择",
                    value: "",
                    label: "是否已关联",
                    list: []
                },
                {
                    type: "input",
                    placeholder: "请输入首次推送",
                    types: "text",
                    value: "",
                    label: "首次推送"
                },
                {
                    type: "sectionValue",
                    value1: "",
                    value2: "",
                    label: "产品库存",
                    unit: "",
                    key1: "",
                    key2: "",
                    pl1: '起始',
                    pl2: '结束  '
                },
                {
                    type: "sectionValue",
                    value1: "",
                    value2: "",
                    label: "产品价格",
                    unit: "",
                    key1: "",
                    key2: "",
                    pl1: '起始',
                    pl2: '结束  '
                },
                {
                    type: "input",
                    placeholder: "请输入厂商",
                    types: "text",
                    value: "",
                    label: "厂商"
                },
                {
                    type: "input",
                    placeholder: "请输入供应商产品ID",
                    types: "text",
                    value: "",
                    label: "供应商产品ID"
                },
                {
                    type: "select",
                    placeholder: "请选择",
                    value: "",
                    label: "是否已存在此批准文号的商品",
                    list: []
                }
            ],
        }
    },
    methods: {
        getList(pageNo) {
            let dataInfo = [
                {
                    id: 1,
                    name: "你好",
                    createTime: '1595244696000'
                },
                {
                    id: 2,
                    name: "你好1",
                    createTime: '1595244696000'
                },
            ];
            let total = 10;
            this.$nextTick(() => {
                this.$refs.dataInfo.loadData(dataInfo, total);
            });
        }
    }
}
</script>
<style lang="scss" scoped>
.suppliers-goods {
    .search-form {
        margin-bottom: 16px;
    }
}
</style>